package com.gzdh.dishrecognition.emu;

import java.util.Objects;

public enum OfflineGetCardSnTypeEmus {
    direct(0, "默认"),
    reverse(1, "取反");

    private Integer value;

    private String name;

    private OfflineGetCardSnTypeEmus(Integer v, String name) {
        this.value = v;
        this.name = name;
    }

    // 根据value返回枚举类型,主要在switch中使用
    public static OfflineGetCardSnTypeEmus getByValue(Integer value) {
        for (OfflineGetCardSnTypeEmus code : values()) {
            if (Objects.equals(code.getValue(), value)) {
                return code;
            }
        }
        return null;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
